Fixes bug with spawning of leaks