Fixed bug with arrays being out of sync. Added comment for future developers.