Validation fixes (Nando's work)

Here it it. Tell me if you found any problem.