Fixed Windows build
Fixed problems with virtual function changing const-ness