catching the terminating 0 that lead to a 5 sec sleep while mantaining the last pulse length