Bugfixes to sdl parser