Fixed build warnings
Changed deprecated interface