Just delete navitem.active instead of set it to false.