Bugfix for issue 164