Bugfix for issue #1113

Bugfix for issue #1113