Adding reformated patch from Stephan Hermann <sh@sourcecode.de> based on the work...