Fixed register vm overwriting it.