Made keygen slightly safer and reduced overhead in acquiring locks