fix bug caused by calling #unshift without calling #dup first (causing data to change state)