Resubmitting fix for issue #1312
Merge pull request #1320 from sethmanheim/working

Resubmitting fix for issue #1312