Fixed some errors coming from the attachment plugin.