Fix for #1299