Fixed bugs

Fixed bug relating to switching algorithm taking longer than expected
and restart button not enabling.