fixed the problem with the output h5m file