Small bug when creating directories