Fixed some RMI-related bugs.