Fixed issue #496