fixing some variable refs