Improved intervals handling