fix function._unpack for chained functions