Fixed some bug when using relation operators