fix object setTimeout

set timer as global var