Fix bug with RAMDirectory