Fixed several compiler warnings