fix misc errrors