Bug #2966 + Bug #2967 + Feature #2488 (partly)

I used master (2.5), but will merge the 2 trivial bugs (docu + assert) to 2.4.6
after closing this pull-request.
Feature #2488 only small(trivial) changes, work not finished, but both commits give identical result.

thanks, Alexander