Stupid logic bug.