Fix for book variable scoping bug.