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

This is a fix for #664