Fixed bugs and added resume button