fixed SDL issues