Fixing pause bug