fixes to 2-opt and 3-opt because original implementation was not correct.