Added limits on key inputs