Fix invalid var pointer