Bug fixes

Killing off bugs that have been around a bit longer than is necessary.