Fix critical threshold check