closes #3596 and #3495