fixed bug when class of data is 'AsIs'