fix several small issues