Fixed a bug caused by refactoring and improper testing (32-bit build affected only).