refs #696, fix issue and add test