Another bunch of fixes