misc fixes & improvements