Fixed exception handling closes #2009