Fixed condition on sleep_interval