Fixed histogram size calculations. Closes #1531.