a few fixes here and there