Fix issue with class method