fixed problem with images with alpha channel and png and gif