Fixed the most noticeable bugs.