Fixed various warnings