better validation (fix)