fix int conversion. closes #22