Fixed a few warnings in code