fixed problems with keys