fixed plotting stuff