Fix some stupid bugs.