For loop bounds check issue resolved.