Two small bug fixes