Added lock() before doing something with properties