fix bug in sp uri