inv#register and test for errors