fix error variable reference