fixed some bug with test