Fixing image validation