updated for issue #547