Fix issue 1580

Fix the issue 1580.