Vector out of range access fixed