Fixed issue 249