2012-7-11 bug fixes from scrpited testing