Add a new test case for autoindent and fix a couple more bugs