Couple fixes for adding variables