Removed an unnecessary map call, moved the setTimeout.