fixing some small bug