Fixed issue #500