Fix attachments php5.5