small updates on uncompress function