DB cleanup fix