fixes vector not incrementable errors on some functions