Fixed so it works to change image in gallery