Fixed error when delete a planification, it remains in memory.