couple of small bug fixes