Fix for problem #2891

fixes #2891