Fix some compilation error issues and strict warnings