fixed some bugs regarding indentations (and de-indentations); improved error reporting