fixed issues #59 and #60