Fix for ticket #1199