fix trailing character