Fixed a problem with jpeg files