[Changed] reverting metadata decoding code back