Fix bug with accessing attachmentsView in contentView