Fixing bugs that occured from recent changes.