Fix for #1367