Segmentation fault in read_key_sequence.