Fix bugs in function indenting