Fixed an issue with SDL2 that was causing crashes.