Fix ruby head encoding issue