You forgot to replace previousVlan with previousNetwork. But if code still works with this error, I think codeflow should be changed - it seems some parts of it are obsolete