Fix issue 5617