Fix bug#10008.

This patch fixes bug#10008.