Fix for #1122