Fixed some stupid bugs.