Fixed critical bug