fix #801 by capturing the current restriction in the spec