Fixed bug where numbers were being encoded as strings