Fixed the detection timer (closes #3)