fixed detectindent call