Fixed a bug with data consistency after an image is created (issue #21)