fixed a bug in uri check