Add some protection against global modifications

See #3.
Version 1.8.2