Correct build warnings for 2 issues - detailed in each commit