refs #5896 added a couple of tests and fixed some issues