Fixed planning crashing on rotate and reload