tried to fix undefined indexes
Merge pull request #318 from BuracayBeach/team4_v2.6.4

tried to fix undefined indexes