bugfix-Various

A couple of issues.