Fixed bugs with crashing, attachments, and more.