fix adding to subclasses list
add write barrier