bugfix for 1198
code review changes
review changes 2
review changes 3
minor changes
Merge pull request #1201 from GiorgiyLutidze/tour_fix

bugfix for 1198