Fixed bug where teachers could not update image of existing XY