Fixed an issue where it fails to encode zero (0)