Rearranged some code, didn't really change much. Still can't figure out that bug.