Fixes bug in the extensions where file extensions weren't allwoed when there are image extensions