Fix timer freeze when delay is not an integer