Fixed bug to call an method of a class instead of a function.