Fixed various compilation warnings