Fixed errors related to changes in sdl2