Bugfix for issue-538