Fix bug of output when fragmt