fix some bug for plan api add create new plan api.