Minor changes to tests and locks