fixing bugs

fix #7