fixed bug that caused only the last plot to render when data is specified as a directory