Fix read only locking with permission changes. #71