Added checks for vector limits.