Fix module deletion