fix ajax upload if you’re viewing the 2nd, 3rd, or 4th image in the gallery