Improved pipeline. Broken encoding