Fix decimal conversion bug