fix issue #547