fix stupid errors: correct date compare