fix: `onload` being called twice