Presumable bug fix. Cleaned up a bit.