Fix broken var references