Fixed unclear error message when x.stack did not have correct message