Partial fix of feature4.
Fixed bug#2.
Final fix of feature4.
Merge branch 'feature4-fix'