fixed get_latest_by