July 17 bug fixes

More bug fixes