Fixed more bugs.  Tested through bulk import.