fix bugs for oracle