fixed register errors