fixed error messages closes #171