fix math in kwallet format