Fixed a couple of races in Directory