Fixed a bug that caused an empty vector