add test cases for dirty uri, and add fix code