get rid of invalid chars