refs #1460 #1499 #1500 fix bug & remove debug