Fixed compile warnings

Yes I didn't see it in the IDE until I refreshed my project in the IDE. I can look at this a bit closer to see if there's a better API to use.