fix #7 & another minor fix