Added time counting even if no keys are found