fix getMethod versus getDeclaredMethod

Few other fixes to output the missing key correctly