Fix missing assignment
Fix typo
Fix warning on 64-bit builds