sdl fixes in system and hge_impl