fixed issue#45 issue#46