SVN-Revision: 35080
SVN-Revision: 34651
This is based on the patch by Peter Wagner. SVN-Revision: 34252