Uri parsing improved