Some fixes for stuff reported by Niels