fix #24 , fix #23, fix #19 ,fix #18 , fix #12