Fixed problem with invalid chars