fix space_authorized_spaces and fix Error exception