Fixed most encoder stuff