Miscellaneous fixes; should fix #33