fix display of greyscale images
fix only init and quit SDL once