Fixed bug where the virtual methods not overwritten