fixed plotting output