bugfix in validation