fix #21. untested