minor fix at checkKey function

Change-Id: Id8f0fbf5474df06a11283b7287f568b2b70f2323