fixed some plotting errors