database cleanup fix