A few small bug corrections