fix #15 , fix #16 , fix #18 , update #1