various small fixes to plot correcttly