fixing encode.hs.