Bugfix in validation