Addresses #1031 and #1287

Addresses #1031 and #1287