fixed issue #113
fixed issue #99
fixed issue #90