fixed crash when deleting module with links