fix #6 & #5