Fix instancemethod bug