issue#6, issue#8 fixed