fixing pherialize long int

- Unserialize integer falls to try long int
- fix serialize long int which should be type `i`, `d` is for double