More fixes for SDL library implementation