Fix problems with module removal in module tracker