fixed another bug with ties