Fix for #1048