Solved problem when several markLoadEventEnd arise: only the last one is considered