check limits before using array index cclp; resolves sf-170