Small bug fixes here and there.