solved attachment bugs