Fix some mistakes in the remoting module