fix #10, #11 #12