Fix error with passing arguments to class methods