fix unread variable warnings