Fix assert in release mode.