fixed problems with picture attachment