Fixing urls again.
Adding more error handling