fix several things