Fixed broken image compare function