should fix #3, untested