fix #1 & #2