Fixed various complier warnings