Bug/switch to db destory