Better character detection