fix #1 & #7