fixed resize / restart bug