Fix issue 510