changed behaviour for doc attachment