fixed some bugs in ripit