fix a bug in calc previous indent