fixed misc bug 7