Prevent bad variable references