fixed register trashing