Unmount before disconnecting so changes are saved