Fix bug where image was not properly being updated