Fix mutability warnings