fixed ricposv codegen