Fixing acts_as_attachment issues