fixed equality check for arrays