Made the tests slightly more robust