Fix bug that prevented setting level