Added an error case for connect to wrong schemes