fixed issues #88 and #89