Fixed problem with nulls in earliest and latest