Fix unnecessary warnings