Rectify various build errors by psndna88