JAVA RMI bug fixes

some minor bugs are fixed