Fix index of to accept ck_str instead of a buffer.