Optimize checkSymmetry (weird bug)