Adding total and fixing the timeout controller.