Fixed CRITICAL bug