fixed image validation