Fixed retrieval of number of bins