fixed afterRender() method not compatible with the base class.