a few small bug fixed