Fixing an issue with img element creation in michael.js