Couple of minor bugfixes