Minor tweaks to help fix ubuntu on 2.6