Remove begin space and end space