misc bug fixed.