fixes for SDL