fix that interval sleep was not effectively working