Fixing date ordering of profiles so the latest one is always returned