Fix error not returned