Fixes bugs reported by Kevin Grandon