using evil global to retain locks

For #13. Not pretty, but it gets rid of the warnings.