Bugfixes
Minor cleanup.