Fix critical bug