fix for issue #539 -- abs() nonsensical in the unsigned domain 

Normally, it *should* be ok, but certain API functions may not like being called with the error indicator set. The other problem is that you're not running the cleanup routines here...