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