fix oob read on vector in registerize