Removed unecessary loop in restart task