Fix variables being accessed