Fix bug in duration, also continue count even page closed.