Fix check for read only classes