Added lock and fixed typo