misc fixes. none critical but nevertheless - bug fixes