closes #1086 and #1085