improper validation fixed