fixed bug with attaching pictures