fixed bug with Pair class