Fixed double timeout setting and missing of first tick