Fixed plotting errors.