Bugfix for issue-571