Why is the setTimeout needed?