Fixed issues relating to automatic variables.