fix for #3774
update for fix
new tests added
Merge pull request #3780 from bilalyasar/mbean

fix for #3774