Fixed bug raised in issue #24 - accessing protected variables