fixed issue #11 #10 #5 #3 #2 #9 #8 #6