Bug/issue 253

Fixes an error with malformed URIs