Fixed calling process_key