Couple of small bug fixes