fix ratchet and typing