Sync with main implementation