made test slightly more robust