Fix validation
fix bugs