fixed image type validation