fix #11 and more fix to #10