fixing bug in dependent pairs