updates for recent changes, and small bug fix