fix issue with arithmetic on strings when setting timeout