// Fixed potential error when deleting a module