encoding problem in rep fix