some small bug fix