Fix unused code warnings