Fixed bug in FEC encoder