Fixes to JMX remoting for 2.x