fix varint implementation
fix singed varint implementation