fixed cleanup db