Fix directory stack empty.