Re-Enabled the commented out code in order to test if it is the cause of un-detachable attachements