Fix variable reference for total hours