Bug fix to auto formatting