Fixed some bugs in rmmanagement