b

Added sanity check to prevent ArrayIndexOutOfBoundsException.