Fix var get method for dynamic vars