fix plan init if no plan in db