Fixing jpeg jpg determination issue