Fixed issue 497