Fix bug when freeing wrapper super class