fixes #56 and #57