Fixed wrong this for onload,onerror callbacks