fix bug in behavior of prepend