remove unwated prims and fix application in interp