Bugfix for histogram

fixes #13