Locking and error handling improvements