Fix issues identified by Johann