fixed misc bug 6