added flat keys with minors and fixed flat key minor bug