uint8_t isn't long enough for keylength anymore.
Need to move vres up to compile.
Fix potential memory error with seeks under concurrency.