fixing bug in level decreasing