Changed timer handling

Removed a bug when stopping the engine.