Fix wrong variable being used.