fixes duplicate method `getMethod`