Fixed frozen on restart bug