fixed problem with overlapping var. names