Bugfix for issue #1113