Fixed various compiler warnings