Fixes #142 (Unable to add image)

This should address the error I was seeing in #142