bug fix (there were the possibility of accessing the first vertex w/o checking the collection size)