fixed bug in the constraints setting in hdf5 and improved docstring