Fixes bug in constructUri error handling. [f:2m]