A couple of fixes to accept precondition format being either a hash or a JSON string.