Added validation to the stages