Update utils.py

small bug with attachments