fixed indentation in setMode