Fix bug when searching rom directory