Some fixes on dates management.