fixes #358 crash on phase change during cast