Fix small bugs for bins and histogram classes