Fixed cross-browser issues with timeouts