Fix #55 and #59