Fix for #1014