Missing variable fixes