Fixes a bug when editing a tunnel