Fixed more misc bugs.