fix #21, also fixed #13 sometime in the past