fixed #4
fixed #5
fixed #6
fixed issue #7
fixed issue #8