fix misc errors