Dfoxpowell/bug cleanup 2

2nd round of bug fixes