fixing directory errors