Fixed some issues with the validator