Add compatibility for legacy onLoad