Removed the setTimeout in favour of a tab's ready event.

If it is a timing issue, that should fix the problem.