fixed timer (temporary fix, no very nice code :( )