Fixed an issue when the method had parameters