fix variable mapping