Fixed compile error on virtual method