resolved bug #59 and #60