Fix character check