Fix issue 1080