Posts sortable column not sorting properly for custom field numbers

I figured it out after adding the same code to a different site I run. It was working fine on that site with the same theme and mostly the same plugins. I narrowed it down to another function I made (thankfully it wasn’t another plugin). The other function was sorting something on the front end, so all I had to do was add if (!is_admin()) to that function. So the moral of the story is, I screwed up in a completely different area. 🙁