fix issue with clearing date