Changed ASCII check function