Fix calculation error in update_online.