fixed issue #12 #11 #10