Dates bugfixing