Finally a more proper fix for issue 1099