Fixed restart bug.