Fix wrong variable reference