Fix duplication of onload callbacks.