Fixes #60 and #56