Race-condition fixes for webtests