Fix specs

The change introduced ealier caused the specs to hang indefinitely.