some bugs in rif module fixed