Changed error so that it doesn't rely on vector access elements