missing cast was preventing compiling on linux