Fixed some issues with histogram plotting.