Fix to prepare the encoder first