add long type support

yet another bug
Merge pull request #21 from lichenbo/patch-1

add long type support