fixes directory spec bugs