Fix module delete bug