Fixed ip issue for better errors - WIP #266

WIP #266 for details