Fixed compile warnings

Not sure why I don't see any deprecation warnings in the IDE, but what is actually deprecated here?