fixed a bug in JPG image import