several tiny fixes