Fix for #523