general, misc fixes