register leak fixed