Reversing result when converting from decimal