Fixed some compiler warnings and possibly solved a hang on game start.