fixed warnings and 64bit compile errors for XCode 5