Fix warnings
fix build failure on 64 bit platforms