Bug fixes. Should have tested that last commit first..