fixed some url parsing issues