Fixed a bug assigning directories list