fix RMI bugs