Fixing bug: setting backup plan and plan occurrence on scheduling + other fixes