This should fix #8 and #9