fixed a npe caused by trim