Fixed required key issue.

Fixed a bug where required keys werent actually required...
Merge pull request #1 from maxdh/feature/required-key-generation

Fixed required key issue.