Fixed test and added validation