Fixed couple of stupid bugs.