Support inbox, today and next
Fix undesirable code