fix some bugs in the rbfm class