modify for ratchet v2.0.2