Client/contract bug fixes