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