Fix #494. Start indexing attachments from 1 instead of 0