64bit warnings

Some more 64bit fixes for you @mattt :neckbeard: