Fixed several errors provided by gcc warnings

Really, virtual destructors are good way to avoid memory leaks :)