fix the way an array is accessed to make code compatible with php 5.3