(#1178) - Make sure all stores are closed if an error occurs with one of them.