Fixing bug: variables need to be available when using get()