Fix for #664, crashed due to ig.Attachements being 0

This is a fix for #664
Thanks for clarifying, makes total sense. Updated the PR!