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