Resolved race condition in timer

too much commits today!