Fixed incorrect histogram bug.