converting tabs to spaces
remove handler after detaching event