v3: fix type issues