fixing issue with validation