Fix warnings and potential issues caused by incorrect header guard