Fix wrong method building.