Fixed left shift size of int.

Simply switched the ordering of the checks in the for loop where this left
shift was being made.
Merge pull request #1993 from jaredlwong/development

Fixed left shift size of int.