Fixing memory leak in removeSpy