Out of curiousity: why is this setTimeout required?