Fixed bug in Timer