Fixed a problem with timer