Sync with Randall's internal version