update timeout_raw and fix lock_raw