Fix #331 - Check for uri scheme and convert it accordingly

Fix #331