UnDeprovision in ActiveRoles Sync Engine

Hello all, 

I am trying to un-deprovision users throught the ActiveRoles SyncEngine.

It works fine if the account is deprovisioned using the script below:

$IsDeprovisioned = $dstObj["edsvaDeprovisionStatus"]
Switch($IsDeprovisioned)
{
1 {"1"; break}
default {$edsvaUnDeprovision=$null}
}

However is the account is not deprovisioned, it returns an error: Error details: Input string was not in a correct format.

It look like a  value can only be written to this attribute when the account is actually deprovisioned.