Fix problem with creating plans