fix for issues #547