Fix warnings around unused variables