Partial fix of feature4
Fixed bug #2
Fixed the rest of feature4
Merge branch 'featur4-fix'