Fixed ticket #1553.

(cherry picked from commit 2dd14e50f416fcc51dbc5008ee0cea4451d82fa7)