fixed registry cleanup