Fixed a bug that made the last source appear twice