various bug fixes for release