Fixed a timing issue with some tests