fixing faulty output due to first draft of attach-attributes()