Why recreate directionLinks every time the goto command is used?