reset registers when spawning