Fixed array index out of bounds error on /c tab complete