fix unknown variables and return statement.