Adding sleep for key registration