changed writelock to readlock

plus a coding standard fix