Fix test
Add some checks for bad parameters
Merge branch 'master' into portCaching
Closes #583. All regression nets pass
Merge branch 'master' into portCaching
Clang fix