Fixed a bug when compiling sdl.
Fixed some compiling issues.