A few minor tweaks to avoid warnings etc.