fix issue 517