Fixed left shift size of int.

Simply switched the ordering of the checks in the for loop where this left
shift was being made.