Changes to support @BeforeSpec hook