fixed global "timer" bug