improve code automatic indentation
fix a bug