fix bug in grade_oracle