fixing image type issue