Fixed issue where setup block is ignored.

This commit fixes #14

Sorry above message should have been in commit message to merge, not sure GitHub will automatically associate this with issue 14 but this should fix the issue I raised there. Test included and passing.