Add batch option to pull_key
fix date comparison