Fixed bug with black images