fixes after pull from Adam.