this fixes #20 and #21