fixed misc bug 4