Bug fix on null dates