fix rational bug