Fixing some deprecated warnings
Fixing build