fix crash because vector len is 0