Fix to get correct length of the compressed inputs