Pact bug fix

http://manage.dimagi.com/default.asp?108971

one commit is just cleanup of whatever was on my screen.

the other is the fix.