Fixed team beforeValidate() method