Fix issue 1580