fixed misc bug 5