Addin fixes from Thomas
Making modifications requested by Thomas