misc changes and fixes