Fixing up restart logic