Fixes bug with error propagation to the client.