fixed bug in rpmc_c