Fixes bug when gallery information is not updated after an image has been uploaded