Implemented remote's proper close().