Fix issue #496