Various bug fixes

2 bug fixes and an enhancement to allow duplicate id's if the method name matches.