fix broken except clause