Fixed syntax error in class method