Fix image comparing method