fix bugs #1