[Bug Fix] Fix IndexOutOfBoundsException with CTF