register clean up