Fixed bug when re-opening .h5