Added assert in B class.