Fixed some plotting bugs