bug fix for comparing photo width&height