misc fixes/improvements