fix uri crash on depricated api