Fix bug with key files.