fix bad var assign