Fix a bug where we don't return an error.