Bug fixes for rmClass