Fixed bug in activity timer