Merge upstream and take keyfile fix.