a variety of fixes