...かえる (換える) => to change; to alter; to transform; to convert; to turn N3
Result status
~ひょうしに(~拍子に)   => the moment [A], unintentionally / inadvertently caused something to happen N1