Some small initial bugfixes.