Fixed possible crash in HandleDismountCommand