Slight optimization to (hopefully) fix intermittent bug

Every now and then the specs used to fail with a timeout. This small change
seems to have fixed the problem as it doesn't occur anymore.