Issue #48 fixed implemntation to return proper errors.